package cn.edu.sptc.chensiyi.hellospring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
    @GetMapping("/hello")
    @ResponseBody
    public String helloWorld(@RequestParam(value = "name",required = false,defaultValue = "张三")String name){
        return  "hello "+name;
    }
}
